import http from '@/utils/http'
const env = import.meta.env
const BASE_URL = env.PROD ? `${env.VITE_API_BASE_URL}/api` : '/api'
const BASE_URL2 = env.PROD ? `${env.VITE_API_BASE_URL3}/api/v1` : '/aapi'
const BASE_URL3 = env.PROD ? `${env.VITE_API_BASE_URL7}/admin` : '/linkk'
const BASE_URL8 = env.PROD ? `${env.VITE_API_BASE_URL8}/api` : '/goods'

/** 商品转链 */
export function getTargetUrl(params: any) {
  return http.post(`${BASE_URL2}/share/getTargetUrl`, params)
}

/** 选品库-列表 */
export function favoriteList(params: any) {
  return http.get(`${BASE_URL}/v1/favorite/lists`, params)
}

/** 选品库-商品添加 */
export function favoriteGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/add`, params)
}

/** 选品库-商品列表*/
export function favoriteGoodsProductSearch(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/productSearch`, params)
}

/** 选品库-商品分类*/
export function selectionGoodCategory(params: any) {
  return http.post(`${BASE_URL}/v1/product/category`, params)
}

/** 选品库-添加 */
export function favoriteAdd(params: any) {
  return http.post(`${BASE_URL}/v1/favorite/add`, params)
}

/** 选品库-删除 */
export function favoriteDelete(params: any) {
  return http.post(`${BASE_URL}/v1/favorite/delete`, params)
}

/** 选品库-修改 */
export function favoriteUpdate(params: any) {
  return http.post(`${BASE_URL}/v1/favorite/update`, params)
}

/** 选品库-商品-列表 */
export function favoriteGoodsList(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/index`, params)
}

/** 选品库-商品-删除 */
export function favoriteGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/delete`, params)
}

/** 选品库-商品-清空商品 */
export function favoriteGoodBatchDelete(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/batchDelete`, params)
}

/** 选品库-商品-一键更新 */
export function favoriteGoodUpdateGoods(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/updateGoods`, params)
}

/** 选品库-商品-导入商品 */
export function favoriteGoodImport(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/import`, params)
}

/** 选品库-商品-获取购买链接 */
export function productPurchaseLink(params: any) {
  return http.post(`${BASE_URL}/v1/product/purchaseLink`, params)
}

/** 选品库-物料-列表 */
export function unionMaterialList(params: any) {
  return http.get(`${BASE_URL}/v1/unionMaterial/lists`, params)
}

/** 选品库-物料-列表不分页 */
export function unionMaterialAllList(params: any) {
  return http.get(`${BASE_URL}/v1/unionMaterial/allList`, params)
}

/** 选品库-物料-添加 */
export function unionMaterialAdd(params: any) {
  return http.post(`${BASE_URL}/v1/unionMaterial/add`, params)
}

/** 选品库-物料-编辑 */
export function unionMaterialEdit(params: any) {
  return http.post(`${BASE_URL}/v1/unionMaterial/update`, params)
}

/** 选品库-物料-删除 */
export function unionMaterialDelete(params: any) {
  return http.post(`${BASE_URL}/v1/unionMaterial/delete`, params)
}

/** 商品转链 */
export function productConvert(params: any) {
  return http.post(`${BASE_URL}/v1/product/convert`, params)
}

/** 选品库-商品-编辑 */
export function favoriteGoodUpdate(params: any) {
  return http.post(`${BASE_URL}/v1/favoriteGoods/update`, params)
}

/** 商品锁定-通过券ID查询券信息 */
export function lockCouponGoodsgetCouponInfo(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/getCouponInfo`, params)
}

/** 商品锁定-商品锁券-列表 */
export function lockCouponGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/lockCouponGoods/lists`, params)
}

/** 商品锁定-商品锁券-新增 */
export function lockCouponGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/add`, params)
}

/** 商品锁定-商品锁券-编辑 */
export function lockCouponGoodsUpdate(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/update`, params)
}

/** 商品锁定-商品锁券-切换 */
export function lockCouponGoodsToggle(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/toggle`, params)
}

/** 商品锁定-商品锁券-删除抖音商品 */
export function lockCouponGoodsDeleteByKl(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/deleteByKl`, params)
}

/** 商品锁定-淘宝锁Pid-删除 */
export function lockCouponGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/delete`, params)
}

/** 商品锁定-淘宝锁Pid-列表 */
export function lockTbPidGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/lockTbPidGoods/lists`, params)
}

/** 商品锁定-淘宝锁Pid-添加 */
export function lockTbPidGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockTbPidGoods/add`, params)
}

/** 商品锁定-淘宝锁Pid-删除 */
export function lockTbPidGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockTbPidGoods/delete`, params)
}

/** 商品锁定-淘宝锁转链-列表 */
export function lockTbTransferList(params: any) {
  return http.get(`${BASE_URL}/v1/lockConvertTbGoodsId/lists`, params)
}

/** 商品锁定-淘宝锁转链-新增 */
export function lockTbTransferAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockConvertTbGoodsId/add`, params)
}

/** 商品锁定-淘宝锁转链-编辑 */
export function lockTbTransferUpdate(params: any) {
  return http.post(`${BASE_URL}/v1/lockCouponGoods/update`, params)
}

/** 商品锁定-淘宝锁转链-删除 */
export function lockTbTransferDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockConvertTbGoodsId/delete`, params)
}

/** 商品锁定-淘宝锁新ID-列表 */
export function lockTbNewIdList(params: any) {
  return http.get(`${BASE_URL}/v1/lockTbGoodsId/lists`, params)
}

/** 商品锁定-淘宝锁新ID-新增 */
export function lockTbNewIdAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockTbGoodsId/add`, params)
}

/** 商品锁定-淘宝锁新ID-删除 */
export function lockTbNewIdDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockTbGoodsId/delete`, params)
}

/** 商品锁定-京东锁Rid-列表 */
export function lockJdRidGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/lockJdRidGoods/lists`, params)
}

/** 商品锁定-京东锁Rid-添加 */
export function lockJdRidGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockJdRidGoods/add`, params)
}

/** 商品锁定-京东锁Rid-删除 */
export function lockJdRidGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockJdRidGoods/delete`, params)
}

/** 商品锁定-唯品会锁Rid-列表 */
export function lockVipRidGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/lockVipZsGoods/list`, params)
}

/** 商品锁定-唯品会锁Rid-添加 */
export function lockVipRidGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockVipZsGoods/add`, params)
}

/** 商品锁定-唯品会锁Rid-删除 */
export function lockVipRidGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockVipZsGoods/delete`, params)
}

/** 商品锁定-京享礼金-列表 */
export function giftCouponJdList(params: any) {
  return http.get(`${BASE_URL}/v1/giftCouponJd/index`, params)
}

/** 商品锁定-京享礼金-添加 */
export function giftCouponJdAdd(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponJd/store`, params)
}

/** 商品锁定-京享礼金-编辑 */
export function giftCouponJdEdit(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponJd/update`, params)
}

/** 商品锁定-京享礼金-删除 */
export function giftCouponJdDelete(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponJd/batchdelete`, params)
}

/** 商品锁定-京享礼金-导入 */
export function giftCouponJdImport(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponJd/import`, params, {}, 'blob')
}

/** 商品锁定-拼多多礼金-列表 */
export function giftCouponPddList(params: any) {
  return http.get(`${BASE_URL}/v1/giftCouponPdd/index`, params)
}

/** 商品锁定-拼多多礼金-添加 */
export function giftCouponPddAdd(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponPdd/store`, params)
}

/** 商品锁定-拼多多礼金-编辑 */
export function giftCouponPddEdit(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponPdd/update`, params)
}

/** 商品锁定-拼多多礼金-删除 */
export function giftCouponPddDelete(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponPdd/batchdelete`, params)
}

/** 商品锁定-拼多多礼金-导入 */
export function giftCouponPddImport(params: any) {
  return http.post(`${BASE_URL}/v1/giftCouponPdd/import`, params, {}, 'blob')
}

/** 商品锁定-拼多多千万神券-列表 */
export function lockPddThousandDivineCouponList(params: any) {
  return http.get(`${BASE_URL}/v1/lockPddThousandDivineCoupon/lists`, params)
}

/** 商品锁定-拼多多千万神券-添加 */
export function lockPddThousandDivineCouponAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockPddThousandDivineCoupon/add`, params)
}

/** 商品锁定-拼多多千万神券-删除 */
export function lockPddThousandDivineCouponDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockPddThousandDivineCoupon/delete`, params)
}

/** 商品锁定-淘宝百亿补贴-列表 */
export function tbTenBillionGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/tbTenBillionGoods/lists`, params)
}

/** 商品锁定-淘宝百亿补贴-商品新增 */
export function tbTenBillionGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/tbTenBillionGoods/add`, params)
}

/** 商品锁定-淘宝百亿补贴-删除 */
export function tbTenBillionGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/tbTenBillionGoods/delete`, params)
}

/** 商品锁定-京东金融商品-列表 */
export function lockJdFinanceGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/lockJdFinanceGoods/lists`, params)
}

/** 商品锁定-京东金融商品-商品新增 */
export function lockJdFinanceGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/lockJdFinanceGoods/add`, params)
}

/** 商品锁定-京东金融商品-删除 */
export function lockJdFinanceGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/lockJdFinanceGoods/batchdelete`, params)
}

/** 商品排行榜 */
export function localRankingGoods(params: any) {
  return http.post(`${BASE_URL}/v1/statistics/goodsStatistic/localRankingGoods`, params)
}

/** 京东大健康商品排行 */
export function greatHealthGoodRankData(params: any) {
  return http.post(`${BASE_URL}/v1/stat/order/greatHealthGoodRankData`, params)
}

/** 商品出单统计 */
export function batchQueryGoodsOrderStatistic(params: any) {
  return http.post(`${BASE_URL}/v1/statistics/goodsStatistic/batchQueryGoodsOrderStatistic`, params)
}

/** 推荐商品列表 */
export function recommendGoodLists(params: any) {
  return http.get(`${BASE_URL}/v1/recommendGood/lists`, params)
}

/** 推荐商品添加 */
export function recommendGoodAdd(params: any) {
  return http.post(`${BASE_URL}/v1/recommendGood/add`, params)
}

/** 推荐商品编辑 */
export function recommendGoodEdit(params: any) {
  return http.post(`${BASE_URL}/v1/recommendGood/update`, params)
}

/** 推荐商品删除 */
export function recommendGoodDelete(params: any) {
  return http.post(`${BASE_URL}/v1/recommendGood/batchdelete`, params)
}

/** 新出单信息 */
export function orderGetNewOrderInfo(params: any) {
  return http.post(`${BASE_URL}/v1/stat/order/getNewOrderInfo`, params)
}

/** 淘密令-列表 */
export function userSecretList(params: any) {
  return http.get(`${BASE_URL}/v1/userSecret/lists`, params)
}

/** 淘密令-添加 */
export function userSecretAdd(params: any) {
  return http.post(`${BASE_URL}/v1/userSecret/add`, params)
}

/** 淘密令-编辑 */
export function userSecretEdit(params: any) {
  return http.post(`${BASE_URL}/v1/userSecret/update`, params)
}

/** 淘密令-删除 */
export function userSecretDelete(params: any) {
  return http.post(`${BASE_URL}/v1/userSecret/batchdelete`, params)
}

/** 淘密令-批量导入 */
export function userSecretImport(params: any) {
  return http.post(`${BASE_URL}/v1/userSecret/import`, params)
}

/** 短链管理-获取数量 */
export function linkGetNum(params: any) {
  return http.post(`${BASE_URL3}/short/link/getNum`, params)
}

/** 短链管理-获取原始链接 */
export function linkGetOriginalUrl(params: any) {
  return http.post(`${BASE_URL3}/short/link/getOriginalUrl`, params)
}

/** 查询淘口令归属 */
export function tbGoodParseTkl(params: any) {
  return http.post(`${BASE_URL}/v1/tbGood/parseTkl`, params)
}

/** 凑单工具 */
export function goodCombinationpage(params: any) {
  return http.get(`${BASE_URL}/v1/jdRewardOrder/getGoodCombinationpage`, params)
}

/** 锁淘礼金-列表 */
export function tbTljGoodList(params: any) {
  return http.get(`${BASE_URL}/v1/tbTljGood/lists`, params)
}

/** 锁淘礼金-添加 */
export function tbTljGoodAdd(params: any) {
  return http.post(`${BASE_URL}/v1/tbTljGood/add`, params)
}

/** 锁淘礼金-编辑 */
export function tbTljGoodEdit(params: any) {
  return http.post(`${BASE_URL}/v1/tbTljGood/update`, params)
}

/** 锁淘礼金-删除 */
export function tbTljGoodDelete(params: any) {
  return http.post(`${BASE_URL}/v1/tbTljGood/batchdelete`, params)
}

/** 定向高佣-列表 */
export function highCommissionGoodsList(params: any) {
  return http.get(`${BASE_URL}/v1/highCommissionGoods/lists`, params)
}

/** 定向高佣-新增 */
export function highCommissionGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/highCommissionGoods/add`, params)
}

/** 定向高佣-编辑 */
export function highCommissionGoodsEdit(params: any) {
  return http.post(`${BASE_URL}/v1/highCommissionGoods/update`, params)
}

/** 定向高佣-删除 */
export function highCommissionGoodsDelete(params: any) {
  return http.post(`${BASE_URL}/v1/highCommissionGoods/delete`, params)
}

/** 定向高佣-详情 */
export function highCommissionGoodsDetail(params: any) {
  return http.post(`${BASE_URL}/v1/highCommissionGoods/detail`, params)
}

/** 定向高佣-批量删除相同佣金 */
export function highCommissionGoodsBatchDeleteSame(params: any) {
  return http.post(`${BASE_URL}/v1/highCommissionGoods/batchDeleteSameCommission`, params)
}

/** 定向高佣-商品批量删除 */
export function highCommissionGoodsBatchDelete(params: any) {
  return http.post(`${BASE_URL}/v1/highCommissionGoods/batchDelete`, params)
}

// 获取商品IDB段
export function goodsDetailWithB(params: any) {
  return http.post(`${BASE_URL8}/v1/goods/open/goodsDetail`, params)
}
